<?php
//Business
require_once '../application/business/AdminBusiness.php';
require_once '../application/business/AuthBusiness.php';
require_once '../application/business/ClientBusiness.php';
require_once '../application/business/ProductBusiness.php';
require_once '../application/business/CartBusiness.php';
require_once '../application/business/AuthBusiness.php';
require_once '../application/business/MessageBusiness.php';
require_once '../application/business/AddressBusiness.php';
require_once '../application/business/TransactionBusiness.php';

//Validator
require_once '../application/validators/ClientValidator.php';
require_once '../application/validators/ContactValidator.php';

class BasicController extends Zend_Controller_Action
{

	public function init()
	{
		$ad = new AdminBusiness();
		$user = Zend_Auth::getInstance()->getStorage()->read();
		$this->view->user = $user;

		if(isset($user) && $user != null){
			$cartBusiness = new CartBusiness();
			$this->view->shopping_count = $cartBusiness->countItems($user['idClient']);
		}
		
		$this->view->enterprises = $ad->getAllEnterprises();
		$this->view->categories = $ad->getAllCategories();
	}

	public function indexAction()
	{
		// action body
	}
}

